public class PlayerStateBehavior_FreeThrow : AbstractPlayerStateBehavior
{
	public static PlayerStateBehavior_FreeThrow instance;

	private PlayerStateBehavior_FreeThrow()
	{
	}

	public static PlayerStateBehavior_FreeThrow getInstance()
	{
		if (instance == null)
		{
			instance = new PlayerStateBehavior_FreeThrow();
		}
		return instance;
	}

	public override void enter(Player owner)
	{
		base.enter(owner);
		if (owner.teamType == TeamType.USER)
		{
			Instance<Court>.instance.count_PauseData_User[0]++;
		}
		else
		{
			Instance<Court>.instance.count_PauseData_Com[0]++;
		}
		owner.playAnimation(AnimationName.player_shoot_early, 1f, 0.5f);
		owner.getBallInHand();
		Instance<Ball>.instance.OnShoot(owner, _isDunk: false, _isLayUp: false, _isFreeThrow: true);
		Instance<Court>.instance.count_FreeThrow--;
		if (Instance<Court>.instance.count_FreeThrow == 0)
		{
			owner.team.setIsOffense(_isOffense: true);
			Instance<Court>.instance.OnFreeThrowEnd();
		}
	}

	public override void fixedUpdate(Player owner)
	{
		base.fixedUpdate(owner);
		if (!owner.IsPlayingAnimation())
		{
			owner.do_idle();
		}
	}

	public override void exit(Player owner)
	{
		base.exit(owner);
		if (Instance<Court>.instance.count_FreeThrow == 0)
		{
			Instance<Court>.instance.do_playing();
			if (true)
			{
				Instance<UIGame>.instance.isLockPauseBtn = false;
				Instance<UIGame>.instance.isLockPassBtn = false;
				Instance<UIGame>.instance.isLockShootBtn = false;
				Instance<UIGame>.instance.isLockJoystick = false;
			}
		}
	}
}
